package com.aliyun.solution.demo.traffic.model;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * ApiResponse
 *
 * @author yeze
 * @date 2024/09/27
 */
public class ApiResponse {

    @JsonProperty("status")
    private final String status;

    @JsonProperty("message")
    private final String message;

    public static class Builder {
        private String status = "success";
        private String message = "ok";

        public Builder withStatus(String status) {
            this.status = status;
            return this;
        }

        public Builder withMessage(String message) {
            this.message = message;
            return this;
        }

        public ApiResponse build() {
            return new ApiResponse(this);
        }
    }

    private ApiResponse(Builder builder) {
        this.status = builder.status;
        this.message = builder.message;
    }

    // Getters
    public String getStatus() {
        return status;
    }

    public String getMessage() {
        return message;
    }
}